#include "fabuzhe.h"
#include "guanchazhe.h"


int main()
{
    fabuzhe1* f1 = new fabuzhe1;
    fabuzhe2* f2 = new fabuzhe2;
    Observer1* o1 = new Observer1("hello", f1);
    Observer1* o2 = new Observer1("world", f1);
    Observer2* o3 = new Observer2("shijie", f2);
    f1->notify("欢迎来学C++");
    cout << "======================================" << endl;
    f2->notify("C++真难学");

    delete f1;
    delete f2;
    delete o1;
    delete o2;
    delete o3;

    return 0;
}
